import { defineStore } from "pinia";
import { getCategories } from "../api/categories";
import { getTechStacks } from "../api/techstack"

export const useProductStore = defineStore('product', {
    state: () => ({
        categores: [], // 分类信息
        techStacks: [] // 技术栈信息
    }),
    getters: {

    },
    actions: {
        async init() {
            this.categores = (await getCategories()).data;
            this.techStacks = (await getTechStacks()).data;
        }
    }
})